<!--
 * @Author: your name
 * @Date: 2022-03-27 23:20:16
 * @LastEditTime: 2022-03-28 00:41:32
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \算法测试\day0906\3.27.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        console.log(Math.round(24.49));
        var array = new Uint32Array(10);
        window.crypto.getRandomValues(array);
        console.log(array);

        let obj = {
            'name' : 123,
            age:666,5:6
        }
        let a = 'name'
        console.log(obj.name);
        console.log(obj['age']);
        let arr = [,,,4,,,6]
        console.log(arr.length);

        let arr1 = [1,2,3,[4,5],4],arr2 = Array.from(arr1);
        arr1[3][0] = 1000;
        arr1[0] = 1000
        console.log(arr1,arr2);

        arr2 = arr1;
        console.log(arr1,arr2);

        let obj1 = {
            0:1,
            1:2,
            2:3,
            3:4,
            length:4
        }
        let obj2 = Array.from(obj1);
        obj1[0] = 1000
        console.log(obj1,obj2);

        obj2.map((x)=>x*2);
        obj2.filter((x)=> {return x*2})
        console.log(obj2);
        console.log(obj2.filter((x)=> {return x>1}));
        console.log(obj2);

        console.log(new Array(2));

        console.log([1,undefined,,,2].map((x) => x+1));
        let arr3 = [];
        arr3[3] = 4;
        console.log(arr3);
        arr3.length = 10;
        console.log(arr3);

        console.log(Array.from(arr3.entries()));
    </script>
</body>

</html>